home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / SYS / s / SASC / FindSymbol.bed < prev    next >
Text File  |  1996-09-26  |  770b  |  42 lines

  1. /*
  2. ** $VER: FindSymbol.bed 1.0 (14.01.96)
  3. **
  4. ** Show the include file in which is defined the symbol under the cursor.
  5. ** It needs the file INCLUDE:all.gst created with this command:
  6. **
  7. ** SC noobjname MGST=INCLUDE:all.gst SC:source/all.c
  8. */
  9.  
  10. gstfile = "INCLUDE:all.gst"
  11. tempfile = 'T:gstout'
  12.  
  13.  
  14. OPTIONS RESULTS
  15.  
  16. 'GetWord'
  17. parm = RESULT
  18.  
  19. IF RC ~= 0 | parm = "" THEN DO
  20.     BeepScreen
  21.     SetStatusBar 'Cursor not on a word !'
  22. END; ELSE DO
  23.  
  24.     ADDRESS COMMAND 'SC:C/GST >' || tempfile gstfile parm
  25.  
  26.     IF RC ~= 0 THEN DO
  27.         BeepScreen
  28.         SetStatusBar 'Symbol not found !'
  29.     END; ELSE DO
  30.         Open(file,tempfile,'read')
  31.         where = ReadLn(file)
  32.         Close(file)
  33.  
  34.         PARSE VAR where file . line .
  35.  
  36.         'OpenDoc WINDOW=////READONLY' file
  37.         ADDRESS VALUE RESULT
  38.         Move line+1
  39.         ScrollView 2
  40.     END
  41. END
  42.